﻿<UserControl x:Class="LaunchPad.Core.Controls.MapControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
 
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="34"/>
            <RowDefinition Height="265*" />
        </Grid.RowDefinitions>
        <CheckBox Name="nodeVisibilityCheckBox" Content="Show Nodes" IsChecked="True" 
                  Checked="NodeVisibilityCheckBoxChecked" 
                  Unchecked="NodeVisibilityCheckBoxUnchecked"
                  HorizontalAlignment="Left" VerticalAlignment="Center" Margin="4" />
        <Border Grid.Row="1" ClipToBounds="True">
        <Canvas Name="mapCanvas" Background="Black" MouseWheel="MapCanvasMouseWheel" >
                <!--<Canvas.Resources>
                    <Storyboard x:Name="ZoomStoryboard">
                        <DoubleAnimation x:Name="ZoomAnimationX"
                                 Storyboard.TargetName="Workspace"
                                 Storyboard.TargetProperty="Canvas.RenderTransform.ScaleTransform.ScaleX"
                                 Duration="0:0:0.2"/>
                        <DoubleAnimation x:Name="ZoomAnimationY"
                                 Storyboard.TargetName="Workspace"
                                 Storyboard.TargetProperty="Canvas.RenderTransform.ScaleTransform.ScaleY"
                                 Duration="0:0:0.2"/>
                    </Storyboard>
                </Canvas.Resources>-->
                <Rectangle Name="selectionRect" Stroke="WhiteSmoke" Visibility="Hidden" StrokeThickness="1" StrokeDashArray="2,2" Width="100" Height="100"/>
            <Canvas.LayoutTransform>
                        <ScaleTransform x:Name="mapScaleTransform"/>
                </Canvas.LayoutTransform>
                <Canvas.RenderTransform>
                    <TranslateTransform x:Name="mapTranslateTransform"/>

                </Canvas.RenderTransform>
            </Canvas>
        </Border>
        <Button Content="Autoassign Nodes" Height="23" HorizontalAlignment="Left" Margin="94,6,0,0" Name="autoplaceButton" VerticalAlignment="Top" Width="113" Click="AutoplaceButtonClick" />
        <Grid.Background>
            <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                <GradientStop Color="#FFCBCBCB" Offset="0" />
                <GradientStop Color="#FF7B7FA0" Offset="1" />
            </LinearGradientBrush>
        </Grid.Background>
    </Grid>
</UserControl>
